package string;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String str = "abc123def456ghi";
        //将数字部分替换成#number#
        str = str.replaceAll("[0-9]+","#NUMBER#");
        System.out.println(str);




        String regex = "(gun|sha|sb)";
        String message = "你sb吧，gun吧";
        message = message.replaceAll(regex,"***");
        System.out.println(message);










    }
    //和谐用语





}
